package com.robot.mvvm.ui.work

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.robot.base.base.activity.GLBaseActivity
import com.robot.base.configs.AppConstants
import com.robot.mvvm.BR
import com.robot.mvvm.R
import com.robot.mvvm.databinding.AppActivitySafetyDetailBinding
import com.robot.mvvm.vm.work.SafetyDetailViewModel

@Route(path = AppConstants.Router.Main.A_SAFETY_DETAIL)
class SafetyDetailActivity:GLBaseActivity<AppActivitySafetyDetailBinding, SafetyDetailViewModel>() {
    var personId = ""
    override fun initContentView(savedInstanceState: Bundle?): Int = R.layout.app_activity_safety_detail

    override fun initVariableId(): Int = BR.viewModel

    override fun initComponents() {
        addSingleTitleBar(getString(R.string.app_tips_93))
        viewModel.getSafetyPersonDetail(personId)
    }

    override fun initParam() {
        super.initParam()
        personId = intent.getStringExtra(AppConstants.BundleKey.PERSON_ID)?:""
    }
}